package com.petdog.petdogapplication;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.util.Collections;

/**
 * 宠物狗应用启动类
 *
 * @author YourName
 * @date 2024
 */
@SpringBootApplication
@MapperScan("com.petdog.infrastructure.mapper")  // 扫描Mapper接口
@EnableTransactionManagement                    // 启用事务管理
@EnableAsync                                    // 启用异步处理
@EnableScheduling                               // 启用定时任务
@EnableConfigurationProperties                  // 启用配置属性绑定
public class PetDogApplication {

    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(PetDogApplication.class);


         application.setDefaultProperties(Collections.singletonMap("server.port", "8081"));

        // 启动应用
        application.run(args);
    }


}